import { request } from '@/utils/request.js'

export function getpartlist(data) {
  return request({
    url: '/api/v1/hospital/acupoint/part/list',
    method: 'get'
  })
}

export function createAcupoint(data) {
  return request({
    url: '/api/v1/hospital/acupoint',
    method: 'POST',
    showLoading: false,
    data
  })
}
export function acupointList(data) {
  return request({
    url: `/api/v1/hospital/acupoint?pageSize=${data.pageSize}&page=${data.page}`,
    method: 'get'
  })
}

export function checkStatus(appointNo) {
  return request({
    url: `/api/v1/hospital/acupoint/info/status?appointNo=${appointNo}`,
    method: 'get',
    showLoading: false
  })
}

export function getResult(appointNo) {
  return request({
    url: `/api/v1/hospital/acupoint/info?appointNo=${appointNo}`,
    method: 'get',
    showLoading: false
  })
}

export function createTonguet(data) {
  return request({
    url: '/api/v1/hospital/tongue',
    method: 'POST',
    showLoading: false,
    data
  })
}

export function tonguetList(data) {
  return request({
    url: `/api/v1/hospital/tongue?pageSize=${data.pageSize}&page=${data.page}`,
    method: 'get'
  })
}

export function checkTongueStatus(appointNo) {
  return request({
    url: `/api/v1/hospital/tongue/info/status?appointNo=${appointNo}`,
    method: 'get',
    showLoading: false
  })
}

export function getTongueResult(appointNo) {
  return request({
    url: `/api/v1/hospital/tongue/info?appointNo=${appointNo}`,
    method: 'get',
    showLoading: false
  })
}

export function getPulseDiagnosisResult(appointNo) {
  return request({
    url: `/api/v1/hospital/pulse_diagnosis/info?appointNo=${appointNo}`,
    method: 'get',
    showLoading: false
  })
}

export function createFaceDiagnosis(data) {
  return request({
    url: '/api/v1/hospital/face_diagnosis',
    method: 'POST',
    showLoading: false,
    data
  })
}

export function answerQuestion(data) {
  return request({
    url: '/api/v1/hospital/face_diagnosis/answer',
    method: 'POST',
    data
  })
}
export function answerTongueQuestion(data) {
  return request({
    url: '/api/v1/hospital/tongue/answer',
    method: 'POST',
    data
  })
}

export function getFinalFaceResult(faceId) {
  return request({
    url: `/api/v1/hospital/face_diagnosis/info?faceId=${faceId}`,
    method: 'get'
  })
}

export function faceDiagnosisList(data) {
  return request({
    url: `/api/v1/hospital/face_diagnosis?pageSize=${data.pageSize}&page=${data.page}`,
    method: 'get'
  })
}

export function pulse_diagnosis(data) {
  return request({
    url: `/api/v1/hospital/pulse_diagnosis`,
    method: 'post',
    data
  })
}

export function pulse_diagnosis_list(data) {
  return request({
    url: `/api/v1/hospital/pulse_diagnosis?pageSize=${data.pageSize}&page=${data.page}`,
    method: 'get'
  })
}
